/**
 * 各種テスト用モックアップデータを作成するロジック
 * @author kino
 */
function MockupCreator(){

}

MockupCreator.createCompoundSearchResults = function(){
    var data = {};
    data.type = ItemType.COMPOUND;
    data.rows = [];
    for (var i = 0; i < 10; i++) {
        var item = {};
        item.budgetId = i;
        item.budgetName = "予算" + i;
        item.budget = i * 10000;
        item.outgoing = i * 1000;
        data.rows.push(item);
    }
	var response = {};
	response.result = data;
	
    return response;
}

MockupCreator.createBudgetSearchResults = function(){
    var data = {};
    data.type = ItemType.BUDGET;
    data.rows = [];
    for (var i = 0; i < 10; i++) {
        var item = {};
        item.budgetId = i;
        item.budgetName = "予算" + i;
        item.budget = i * 10000;
        data.rows.push(item);
    }
	var response = {};
	response.result = data;
	
    return response;
}

MockupCreator.createOutgoingSearchResults = function(){
    var data = {};
    data.type = ItemType.OUTGOING;
    data.rows = [];
    for (var i = 0; i < 10; i++) {
        var item = {};
        item.budgetId = i;
        item.budgetName = "予算" + i;
        item.outgoingId = i;
        item.outgoingName = "支出" + i;
        item.outgoing = i * 1000;
		item.dateTime = 0;
        data.rows.push(item);
    }
	var response = {};
	response.result = data;
	
    return response;
}

MockupCreator.createCompoundQuery = function(){
    var query = new Query();
    query.type = ItemType.COMPOUND;
    query.userId = 0;
    query.year = 2009;
    query.month = 7;
    return query;
}

MockupCreator.createSession = function(){
    var session = new Session();
    session.user = "徳島 太郎";
    session.password = "11111";
    session.sessionId = 1;
    session.expireDate = new Date(2009, 8, 30);
    return session;
}
